@use 'sass:map';
@use 'sass:color';

// 资产总览 展开数量统计 动画
.expand-number-statistic {
  width: 100%;
  height: 130px;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  flex-wrap: wrap;

  // transition: height 0.5s;
  // 展开的高度
  &.shrink-number-statistic {
    height: 100%;
  }
}

.number-statistic-ElDialog {
  // 去掉原弹窗的内边距
  :global {
    .el-dialog .el-dialog__body {
      padding: 24px 0 0 24px;
    }
  }
}

.number-statistic-box {
  margin-top: map.get($spacing, 'firstGear');
  margin-bottom: map.get($spacing, 'firstGear');

  &.shrink-number-statistic {
    height: 120px;
    overflow: hidden;
  }
}

// 资产总览 数量统计
.number-statistic {
  display: flex;
  margin-bottom: map.get($spacing, 'secondGear');

  // 资产总览 数量统计 卡片
  .number-statistic-cards {
    width: 100%;
    height: 120px;

    // margin: 0 19px 19px 0;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: $color-white;
    position: relative;

    // 卡片图标
    .number-statistic-cards-icon {
      font-size: map.get($font-size, 'extra-large') + 27; // 63px
      margin-top: 11px;
    }

    .number-statistic-cards-words {
      vertical-align: middle;

      // 卡片数字
      .number-statistic-cards-data {
        display: flex;
        align-items: baseline;

        .number-statistic-cards-num {
          font-size: map.get($font-size, 'extra-large') + 4; // 40px
          margin-top: 4px; // 字离上28px
          margin-left: 5px; // 字离左29px
          color: $color-white;
        }

        .number-statistic-cards-unit {
          font-size: map.get($font-size, 'extra-small'); // 12px
        }
      }

      .number-statistic-cards-name {
        font-size: map.get($font-size, 'extra-small') + 2; // 14px
        margin-left: 5px; // 字离左29px
      }
    }
  }

  // 每行最后一个没有右边距
  // .number-statistic-cards-lastCol {
  // margin: 0 0 19px;
  // }

  // 第非3的倍数个ElCard离右边距离
  // .number-statistic-cards-margin {
  //   margin-right: -20px;
  // }

  // 资产总览 数量统计 隐藏卡片的图标
  .number-statistic-cards-hidden {
    font-size: map.get($font-size, 'medium') + 2; // 20px
    opacity: 0.5;
    position: absolute;
    top: 4px;
    right: 6px;
  }

  .number-statistic-cards-hidden:hover {
    opacity: 1;
  }

  // 资产总览 数量统计弹窗 显示/隐藏卡片的图标
  .number-statistic-cards-show {
    font-size: map.get($font-size, 'medium'); // 18px
    opacity: 1;
    position: absolute;
    bottom: -2px;
    right: 3px;
  }

  // .number-statistic-cards-show:hover {
  //   opacity: 0.6;
  // }

  .number-statistic-cards:hover {
    opacity: 0.8;
  }

  // 去掉原卡片的边框
  :global {
    .el-card {
      border: none;
    }
  }

  // 资产总览 数量统计 +号卡片
  .number-statistic-cards-add {
    width: 100%; // 298+2=300
    height: 118px; // 118+2=120
    border: 1px dashed var(--el-border-color);
    border-radius: map.get($border-radius, 'base') * 2;
    background-color: color.adjust($color-info, $alpha: -0.95);

    // 资产总览 数量统计 +号卡片的图标
    .number-statistic-cards-add-icon {
      // font-size: map.get($font-size, 'extra-large') + 9; // 45px
      // color: color.adjust($color-info, $alpha: -0.5);
      // text-align: center;
      margin-top: 15%;
      margin-left: auto;
      margin-right: auto;
      width: 42px;
    }
  }
}

// 资产总览 数量统计 是否展开图标
.number-statistic-expand-icon {
  text-align: center;
  margin-bottom: map.get($spacing, 'firstGear');
}

.number-statistic-expand-icon-hid {
  height: 16px;
}

// 资产总览 弹窗提交按钮
.confirm-button {
  text-align: right;
  margin-bottom: 24px;

  .confirm-button-cancel {
    width: 76px;
    height: 32px;
    margin-right: 24px;
    font-size: map.get($font-size, 'small'); // 14px
    border-color: $color-primary;
    color: $color-primary;
    border-radius: 2px;
    opacity: 1;
  }

  .confirm-button-cancel:hover {
    opacity: 0.6;
  }

  .confirm-button-submit {
    width: 76px;
    height: 32px;
    border-radius: 2px;
    margin-left: 0;
    margin-right: 24px;
    font-size: map.get($font-size, 'small'); // 14px
  }
}

// 资产总览 图表统计

.charts-stastic-item {
  width: 100%;
  height: 400px;
  margin-bottom: map.get($spacing, 'secondGear');
  position: relative;
  border-width: 0;

  :global {
    .el-radio-group {
      vertical-align: middle;
    }

    .el-card__body {
      padding: 0;
    }

    .el-scrollbar {
      --el-scrollbar-bg-color: var(--el-color-primary);
      --el-scrollbar-hover-bg-color: var(--el-color-primary);
    }
  }

  // 标题头
  .statistic-title {
    // background-color: map.get($border-color, 'lighter');
    background-color: map.get($fill-color, 'light');
    padding-left: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
    position: relative;

    // display: flex;
    // justify-content: space-between;

    // 资产总览 图表统计 日期搜索
    .data-pick-position {
      text-align: right;
      position: absolute;
      top: 11px;
      right: 11px;

      .data-pick-width {
        width: 50%;
        margin-right: 5px;
      }
    }
  }

  // 工区总设施投入占比图
  .statistic-pieChart {
    margin-left: 11px;
    margin-bottom: 11px;

    // 半透明圆环 工区总设施投入占比图
    .statistic-pieCircle {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      border: 9px solid color.adjust($color-white, $alpha: -0.7);
      position: absolute;
      top: 43.4%;
      left: 45%;
      z-index: 1;
    }
  }

  // 柱状图 工区设施投入对比图
  .statistic-barChart {
    margin: 0 84px 20px 38px;
  }

  // 隐藏图表的图标按钮
  .charts-statistic-cards-show {
    position: absolute;
    bottom: map.get($spacing, 'secondGear');
    right: map.get($spacing, 'secondGear');
    color: $color-primary;
    font-size: map.get($font-size, 'medium') + 2; // 20px
    opacity: 1;
  }

  .charts-statistic-cards-show:hover {
    opacity: 0.6;
  }
}

// 第单数个ElCard离右边距离
// .charts-stastic-item-margin {
//   margin-right: 24px;
// }

// 图表统计 加号
.charts-stastic-hidden {
  width: 100%;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-width: 0;

  // 资产总览 图表统计 +号卡片的图标
  .charts-statistic-cards-add-icon {
    // font-size: map.get($font-size, 'extra-large') * 3; // 120px
    // color: color.adjust($color-info, $alpha: -0.5);
    width: 118px;
  }
}

.charts-statistic-ElDialog {
  // 去掉原弹窗的内边距
  :global {
    .el-dialog .el-dialog__body {
      padding: 0;
    }
  }
}

// 图表统计 弹窗
.charts-statistic-option {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 6px;
  padding: 24px;

  // 图表统计 弹窗卡片
  .charts-statistic-option-cards {
    color: $color-white;
    position: relative;

    // 图表统计 弹窗 显示/隐藏卡片的图标
    .charts-statistic-option-cards-show {
      position: absolute;
      bottom: 7px;
      right: 27px;
    }

    :global {
      .el-card__body {
        padding: 0 24px 0 0;
      }
    }
  }

  .charts-statistic-option-cards-margin {
    // 图表统计 弹窗 显示/隐藏卡片的图标
    .charts-statistic-option-cards-show {
      position: absolute;
      bottom: 7px;
      right: 3px;
    }

    :global {
      .el-card__body {
        padding-right: 0;
        padding-bottom: 0;
      }
    }
  }

  .charts-statistic-option-name {
    text-align: center;
    font-size: map.get($font-size, 'base');
  }

  // 图表统计 弹窗 图片
  .charts-statistic-option-cards-image {
    background-repeat: no-repeat;
  }

  .charts-statistic-option-cards-show:hover {
    opacity: 0.6;
  }

  // 去掉原卡片的边框
  :global {
    .el-card {
      border: none;
    }
  }
}

// 图表统计 各图表高度
.bar-chart,
.line-chart {
  .statistics-map {
    height: 340px;
  }
}

.pie-chart {
  .statistics-map {
    height: 360px;
  }
}
